package com.scenic.rd_android.ui;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.AttributeSet;

import com.scenic.rd_android.R;

public class ViewDrawRight extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_view_draw_right);


        setContentView(new RDEditTextDrawRight(this));


    }

    static class RDEditTextDrawRight extends android.support.v7.widget.AppCompatEditText {

        RDEditTextDrawRight(Context context) {
            super(context);
        }

        public RDEditTextDrawRight(Context context, AttributeSet attrs) {
            super(context, attrs);
        }

        @Override
        protected void onAttachedToWindow() {
            super.onAttachedToWindow();

            Drawable drawable = getResources().getDrawable(R.drawable.dialog_loading_img);

            drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());

            setCompoundDrawables(null, null, drawable, null);
        }
    }

}
